﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using XT.BusinessService;
using XT.Model;

namespace XT.Web.Controllers
{
    public class CityController : Controller
    {
        private object GetResponse(City c)
        {
            return new
            {
                Id = c.Id,
                Name = c.City_Name,
                Location = c.City_Location,
                Description = c.City_Description
            };
        }

        //
        // GET: /City/

        public ActionResult Index()
        {
            var cityService = MvcApplication.GetInstance<ICityService>();
            List<City> lstCity = (List<City>) cityService.GetCitys().ToList();
            return View(lstCity);
        }

    }
}
